package com.seanchenxi.gwt.wordpress.xmlrpc.service.model.impl;

import java.util.HashMap;

import com.seanchenxi.gwt.wordpress.domain.model.Blog;
import com.seanchenxi.gwt.xmlrpc.client.model.impl.BaseModelImpl;

public class BlogImpl extends BaseModelImpl implements Blog {
	
	/**
	 * Generated id
	 */
	private static final long serialVersionUID = 3699184195733160304L;
	static final String IS_ADMIN = "isAdmin";
	static final String NAME = "blogName";
	static final String ID = "blogid";
	static final String URL = "url";
	static final String XMLRPC = "xmlrpc";
	
	public BlogImpl() {
		super();
	}

	public BlogImpl(HashMap<String, Object> properties) {
		super(properties);
	}

	@Override
	public void setAdmin(boolean isAdmin) {
		set(IS_ADMIN, isAdmin);
	}

	@Override
	public void setId(String blogid) {
		set(ID, blogid);	
	}

	@Override
	public void setName(String blogName) {
		set(NAME, blogName);	
	}

	@Override
	public void setUrl(String url) {
		set(URL, url);	
	}

	@Override
	public void setXmlrpc(String xmlrpc) {
		set(XMLRPC, xmlrpc);
	}

	@Override
	public boolean isAdmin() {
		return get(IS_ADMIN);
	}

	@Override
	public String getId() {
		return get(ID);
	}

	@Override
	public String getName() {
		return get(NAME);
	}

	@Override
	public String getUrl() {
		return get(URL);
	}

	@Override
	public String getXmlrpc() {		
		return get(XMLRPC);
	}

}
